package top.jle.wx.proxy.exception;


import lombok.Getter;

@Getter
public enum ExceptionCode {




    //Basic

    GET_ACCESS_TOKEN_FAIL("0.1.0","获取ACCESS_TOKEN失败"),

    GET_JSAPI_TICKET_FAIL("0.1.1","获取JS_TICKET失败"),


    //Oauth2

    OAUTH_CODE_INVALID("0.2.0","无效授权码"),

    JS_CODE_2_SESSION_FAIL("0.2.1","无效授权码"),

    // CustomMenus

    CREATE_MENUS_FAIL ("0.3.0","创建菜单失败"),

    OUT_OF_MENU_LIMIT("0.3.1","菜单数量超过限制"),

    OUT_OF_SUB_MENU_LIMIT ("0.3.2","子菜单数量超过限制"),

    CREATE_CONDITIONAL_MENUS_FAIL("0.3.3","创建个性化菜单失败"),

    DEL_CONDITIONAL_MENUS_FAIL("0.3.4","删除个性化菜单失败"),

    GET_MENU_FAIL("0.3.5","获取菜单失败"),

    //Material

    UPLOAD_TEMPORARY_FAIL("0.4.0","上传临时素材失败"),

    UPLOAD_MATERIAL_FAIL("0.4.1","上传素材失败"),


    ADD_ARTICLES_FAIL("0.4.2","添加图文失败"),

    OUT_OF_ARTICLES_LIMIT("0.4.3","图文数量超过限制"),

    UPDATE_ARTICLE_FAIL("0.4.4","更新图文失败"),

    GET_MATERIAL_COUNT_FAIL("0.4.5","获取素材数量失败"),

    GET_MATERIAL_LIST_FAIL("0.4.6","获取素材列表失败"),

    //Fans

    GET_FANS_INFO_FAIL("0.5.0","获取粉丝信息失败"),

    GET_FANS_INFO_LIST_FAIL("0.5.1","获取粉丝信息列表失败"),

    GET_FANS_ID_LIST_FAIL("0.5.2","获取粉丝ID列表失败"),


    //Tool

    CREATE_QRCODE_FAIL("0.6.0","创建临时二维码失败"),

    CREATE_LIMIT_QRCODE_FAIL("0.6.1","创建永久二维码失败"),

    LONG_URL_TO_SHORT_FAIL("0.6.2","长链接转短链接失败"),

    //TemplateMsg

    SET_INDUSTRY_FAIL("0.7.0","设置模板消息行业失败"),

    GET_INDUSTRY_FAIL("0.7.1","获取模板消息行业失败"),

    SEND_TEMPLATE_MSG_FAIL("0.7.2","发送模板消息失败"),

    //Message

    NOT_SUPPORTED_MESSAGE_TYPE("0.8.0","消息类型不支持"),

    SEND_FAIL("0.8.1","消息发送失败"),

    //Invoice
    CREATE_CARD_FAIL("0.10.0","创建卡券失败"),

    UPLOAD_PDF_FAIL("0.10.1","上传PDF失败"),

    GET_PDF_FAIL("0.10.2","获取PDF失败"),

    INSERT_INVOICE_FAIL("0.10.3","添加发票失败"),

    MCH_CERTIFICATE_NOT_EXISTS("0.12.0","商户证书不存在"),
    ;

    private final String code;
    private final String name;

    private static final String PREFIX = "wx.";

    ExceptionCode(String code, String name) {
        this.code = PREFIX+code;
        this.name = name;
    }
}
